# Contributor: Bart Ribbers <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
maintainer="team/kde <bribbers@disroot.org>"
pkgname=khelpcenter
pkgver=24.08.2
pkgrel=0
pkgdesc="Application to show KDE Applications' documentation"
# armhf blocked by extra-cmake-modules
# x86 blocked by reduced qtwebengine featureset
# armv7, ppc64le, s390x, riscv64, loongarch64 blocked by qt6-qtwebengine
arch="all !armhf !x86 !armv7 !ppc64le !s390x !riscv64 !loongarch64"
url="https://userbase.kde.org/KHelpCenter"
license="GPL-2.0-or-later AND GFDL-1.2-only"
makedepends="
	extra-cmake-modules
	grantlee-dev
	karchive-dev
	kbookmarks-dev
	kconfig-dev
	kcoreaddons-dev
	kdbusaddons-dev
	kdoctools-dev
	ki18n-dev
	kio-dev
	kservice-dev
	ktexttemplate-dev
	kwindowsystem-dev
	libxml2-dev
	qt6-qtbase-dev
	qt6-qtwebengine-dev
	samurai
	xapian-core-dev
	"
subpackages="$pkgname-doc $pkgname-lang"
_repo_url="https://invent.kde.org/system/khelpcenter.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/khelpcenter-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
0e04b7d4d38c89862ef30481f693e65ede15b0629ec89df158c51d165106665b4725b89152a1959889c28f66d612acfc155eda4bc47b8412383bcacb5c8623b2  khelpcenter-24.08.2.tar.xz
"
